package com.ytf.test.third;

import java.util.Random;

/**
 * @author: YTF
 * @date: 2024/9/12 14:36
 * @version: 1.0
 * @description: 布尔逻辑操作符
 */
public class Bool {
    public static void main(String[] args) {
        Random random = new Random(47);
        int i1 = random.nextInt(100);
        int i2 = random.nextInt(100);
        System.out.println("i1:"+i1+" i2:"+i2);
        System.out.println("i1>i2 is "+(i1>i2));
        System.out.println("i1<i2 is "+(i1<i2));
        System.out.println("i1>=i2 is "+(i1>=i2));
        System.out.println("i1<=i2 is "+(i1<=i2));
        System.out.println("i1==i2 is "+(i1==i2));
        System.out.println("i1!=i2 is "+(i1!=i2));
        //! System.out.println("i1&&i2 is "+(i1&&i2));
        //! System.out.println("i1||i2 is "+(i1||i2));
        //! System.out.println("!i1 is "+(!i1));
        System.out.println("i1<10 && i2 <10 :"+(i1<10 && i2 <10));
        System.out.println("i1<10 || i2 <10 :"+(i1<10 || i2 <10));
        /**
         * output:
         * i1:58 i2:55
         * i1>i2 is true
         * i1<i2 is false
         * i1>=i2 is true
         * i1<=i2 is false
         * i1==i2 is false
         * i1!=i2 is true
         * i1<10 && i2 <10 :false
         * i1<10 || i2 <10 :false
         */
    }
}
